home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
thinkref
/
archive
/
THINKPascalUH2.1.sea
/
THINKPas Univ Hdr 2.1
/
Interfaces
/
OCEMessaging.p
< prev
next >
Wrap
Text File
|
1995-09-14
|
28KB
|
1,144 lines
{ Converted with MPW2TPas Tuesday, September 12, 1995 8:33:10 PM }
{}
{ File: OCEMessaging.p}
{ }
{ Contains: Apple Open Collaboration Environment Messaging Interfaces.}
{ }
{ Version: Technology: AOCE Toolbox 1.02}
{ Package: Universal Interfaces 2.1 in “MPW Latest” on ETO #18}
{ }
{ Copyright: © 1984-1995 by Apple Computer, Inc.}
{ All rights reserved.}
{ }
{ Bugs?: If you find a problem with this file, use the Apple Bug Reporter}
{ stack. Include the file and version information (from above)}
{ in the problem description and send to:}
{ Internet: apple.bugs@applelink.apple.com}
{ AppleLink: APPLE.BUGS}
{ }
{}
unit OCEMessaging;
interface
{$IFC UNDEFINED __OCEMESSAGING__}
{$SETC __OCEMESSAGING__ := 1}
uses
ConditionalMacros, Types, AppleTalk, Processes, PPCToolbox, Notification, EPPC, Files, Aliases, AppleEvents, DigitalSignature, OCE, OCEAuthDir;
{ $PUSH}
{ $ALIGN MAC68K}
{ $LibExport+}
{****************************************************************************}
{ Definitions common to OCEMessaging and to OCEMail. These relate to addressing,}
{message ids and priorities, etc. }
{ Values of IPMPriority }
const
kIPMAnyPriority = 0; { FOR FILTER ONLY }
kIPMNormalPriority = 1;
kIPMLowPriority = 2;
kIPMHighPriority = 3;
type
IPMPriority = SignedByte;
{ Values of IPMAccessMode }
const
kIPMAtMark = 0;
kIPMFromStart = 1;
kIPMFromLEOM = 2;
kIPMFromMark = 3;
type
IPMAccessMode = INTEGER;
const
kIPMUpdateMsgBit = 4;
kIPMNewMsgBit = 5;
kIPMDeleteMsgBit = 6;
{ Values of IPMNotificationType }
kIPMUpdateMsgMask = $10;
kIPMNewMsgMask = $20;
kIPMDeleteMsgMask = $40;
type
IPMNotificationType = SignedByte;
{ Values of IPMSenderTag }
const
kIPMSenderRStringTag = 0;
kIPMSenderRecordIDTag = 1;
type
IPMSenderTag = INTEGER;
const
kIPMFromDistListBit = 0;
kIPMDummyRecBit = 1;
kIPMFeedbackRecBit = 2; { should be redirected to feedback queue }
kIPMReporterRecBit = 3; { should be redirected to reporter original queue }
kIPMBCCRecBit = 4; { this recipient is blind to all recipients of message }
{ Values of OCERecipientOffsetFlags }
kIPMFromDistListMask = $1;
kIPMDummyRecMask = $2;
kIPMFeedbackRecMask = $4;
kIPMReporterRecMask = $8;
kIPMBCCRecMask = $10;
type
OCERecipientOffsetFlags = SignedByte;
OCECreatorType = record
msgCreator: OSType;
msgType: OSType;
end;
const
kIPMTypeWildCard = 'ipmw';
kIPMFamilyUnspecified = 0;
kIPMFamilyWildCard = $3F3F3F3F; { '??^ }
{}
{ * well known signature }
kIPMSignature = 'ipms'; { base type }
{}
{ * well known message types }
kIPMReportNotify = 'rptn'; { routing feedback}
{}
{ * well known message block types }
kIPMEnclosedMsgType = 'emsg'; { enclosed (nested) message }
kIPMReportInfo = 'rpti'; { recipient information }
kIPMDigitalSignature = 'dsig';
{ Values of IPMMsgFormat }
kIPMOSFormatType = 1;
kIPMStringFormatType = 2;
type
IPMMsgFormat = INTEGER;
IPMStringMsgType = Str32;
TheType = record
case INTEGER of
0: (
msgOSType: OCECreatorType;
);
1: (
msgStrType: IPMStringMsgType;
);
end;
IPMMsgType = record
format: IPMMsgFormat; { IPMMsgFormat}
theType: TheType;
end;
{}
{Following are the known extension values for IPM addresses handled by Apple.}
{We define the definition of the entn extension below.}
{}
const
kOCEalanXtn = 'alan';
kOCEentnXtn = 'entn'; { entn = entity name (aka DSSpec) }
kOCEaphnXtn = 'aphn';
{}
{Following are the specific definitions for the extension for the standard}
{OCEMail 'entn' addresses. [Note, the actual extension is formatted as in}
{IPMEntityNameExtension.]}
{}
{ entn extension forms }
kOCEAddrXtn = 'addr';
kOCEQnamXtn = 'qnam';
kOCEAttrXtn = 'attr'; { an attribute specification }
kOCESpAtXtn = 'spat';
{}
{Following are the specific definitions for standard}
{OCEMail 'aphn' extension value. }
{}
{All RStrings here are packed (e.g. truncated to length) and even padded (e.g.}
{if length odd, then a pad byte (zero) should be introduced before the next field).}
{}
{The extension value is in the packed form of the following structure:}
{ RString phoneNumber;}
{ RString modemType;}
{ Str32 queueuName;}
{}
{The body of phoneNumber compound RString is in the packed form of the following structure:}
{ short subType;}
{ RString countryCode; // used when subType == kOCEUseHandyDial}
{ RString areaCode; // used when subType == kOCEUseHandyDial}
{ RString phone; // used when subType == kOCEUseHandyDial}
{ RString postFix; // used when subType == kOCEUseHandyDial}
{ RString nonHandyDialString; // used when subType == kOCEDontUseHandyDial}
{}
{ phoneNumber sub type constants }
kOCEUseHandyDial = 1;
kOCEDontUseHandyDial = 2;
{ FORMAT OF A PACKED FORM RECIPIENT }
type
ProtoOCEPackedRecipient = record
dataLength: INTEGER;
end;
const
kOCEPackedRecipientMaxBytes = 4094;
type
OCEPackedRecipient = record
dataLength: INTEGER;
data: array[0..4093] of SInt8; { Byte }
end;
IPMEntnQueueExtension = record
queueName: Str32;
end;
{ kOCEAttrXtn }
IPMEntnAttributeExtension = record
attributeName: AttributeType;
end;
{ kOCESpAtXtn }
IPMEntnSpecificAttributeExtension = record
attributeCreationID: AttributeCreationID;
attributeName: AttributeType;
end;
{ All IPM entn extensions fit within the following }
IPMEntityNameExtension = record
subExtensionType: OSType;
case INTEGER of
0: (
specificAttribute: IPMEntnSpecificAttributeExtension;
);
1: (
attribute: IPMEntnAttributeExtension;
);
2: (
queue: IPMEntnQueueExtension;
);
end;
{ addresses with kIPMNBPXtn should specify this nbp type }
IPMMsgID = record
id: array[0..3] of LONGINT;
end;
{ Values of IPMHeaderSelector }
const
kIPMTOC = 0;
kIPMSender = 1;
kIPMProcessHint = 2;
kIPMMessageTitle = 3;
kIPMMessageType = 4;
kIPMFixedInfo = 7;
type
IPMHeaderSelector = SInt8;
TheSender = record
case INTEGER of
0: (
rString: RString;
);
1: (
rid: PackedRecordID;
);
end;
IPMSender = record
sendTag: IPMSenderTag;
theSender: TheSender;
end;
{****************************************************************************}
{ Definitions specific to OCEMessaging }
IPMContextRef = LONGINT;
IPMQueueRef = LONGINT;
IPMMsgRef = LONGINT;
IPMSeqNum = LONGINT;
IPMProcHint = Str32;
IPMQueueName = Str32;
IPMNoteProcPtr = ProcPtr; { PROCEDURE IPMNote(queue: IPMQueueRef; seqNum: IPMSeqNum; notificationType: ByteParameter; userData: LONGINT); }
IPMNoteUPP = UniversalProcPtr;
const
uppIPMNoteProcInfo = $000037C0; { PROCEDURE (4 byte param, 4 byte param, 1 byte param, 4 byte param); }
function NewIPMNoteProc (userRoutine: IPMNoteProcPtr): IPMNoteUPP;
{$IFC NOT GENERATINGCFM }
inline
$2E9F;
{$ENDC}
procedure CallIPMNoteProc (queue: IPMQueueRef; seqNum: IPMSeqNum; notificationType: ByteParameter; userData: LONGINT; userRoutine: IPMNoteUPP);
{$IFC NOT GENERATINGCFM}
inline
$205F, $4E90;
{$ENDC}
type
IPMFixedHdrInfo = record
version: INTEGER;
authenticated: BOOLEAN;
signatureEnclosed: BOOLEAN; { digital signature enclosed }
msgSize: LONGINT;
notification: IPMNotificationType;
priority: IPMPriority;
blockCount: INTEGER;
originalRcptCount: INTEGER; { original number of recipients }
refCon: LONGINT; { Client defined data }
reserved: INTEGER;
creationTime: UTCTime; { Time when it was created }
msgID: IPMMsgID;
family: OSType; { family this msg belongs (e.g. mail) }
end;
const
kIPMDeliveryNotificationBit = 0;
kIPMNonDeliveryNotificationBit = 1;
kIPMEncloseOriginalBit = 2;
kIPMSummaryReportBit = 3;
{ modify enclose original to only on error }
kIPMOriginalOnlyOnErrorBit = 4;
kIPMNoNotificationMask = $00;
kIPMDeliveryNotificationMask = $1;
kIPMNonDeliveryNotificationMask = $2;
kIPMDontEncloseOriginalMask = $00;
kIPMEncloseOriginalMask = $4;
kIPMImmediateReportMask = $00;
kIPMSummaryReportMask = $8;
kIPMOriginalOnlyOnErrorMask = $10;
kIPMEncloseOriginalOnErrorMask = $14;
{ standard Non delivery codes }
kIPMNoSuchRecipient = $0001;
kIPMRecipientMalformed = $0002;
kIPMRecipientAmbiguous = $0003;
kIPMRecipientAccessDenied = $0004;
kIPMGroupExpansionProblem = $0005;
kIPMMsgUnreadable = $0006;
kIPMMsgExpired = $0007;
kIPMMsgNoTranslatableContent = $0008;
kIPMRecipientReqStdCont = $0009;
kIPMRecipientReqSnapShot = $000A;
kIPMNoTransferDiskFull = $000B;
kIPMNoTransferMsgRejectedbyDest = $000C;
kIPMNoTransferMsgTooLarge = $000D;
{***********************************************************************}
{}
{This is the structure that will be returned by enumerate and getmsginfo}
{This definition is just to give you a template, the position of msgType}
{is variable since this is a packed structure. procHint and msgType are}
{packed and even length padded.}
{}
{* master message info }
type
IPMMsgInfo = record
sequenceNum: IPMSeqNum;
userData: LONGINT;
respIndex: INTEGER;
padByte: SInt8;
priority: IPMPriority;
msgSize: LONGINT;
originalRcptCount: INTEGER;
reserved: INTEGER;
creationTime: UTCTime;
msgID: IPMMsgID;
family: OSType; { family this msg belongs (e.g. mail) }
procHint: IPMProcHint;
filler2: SInt8;
msgType: IPMMsgType;
end;
IPMBlockType = OCECreatorType;
IPMTOC = record
blockType: IPMBlockType;
blockOffset: LONGINT;
blockSize: LONGINT;
blockRefCon: LONGINT;
end;
{}
{The following structure is just to describe the layout of the SingleFilter.}
{Each field should be packed and word aligned when passed to the IPM ToolBox.}
{}
IPMSingleFilter = record
priority: IPMPriority;
padByte: SInt8;
family: OSType; { family this msg belongs (e.g. mail), '??^ for all }
script: ScriptCode; { Language Identifier }
hint: IPMProcHint;
filler2: SInt8;
msgType: IPMMsgType;
end;
IPMFilter = record
count: INTEGER;
sFilters: array[0..0] of IPMSingleFilter;
end;
{************************************************************************}
{Following structures define the “start” of a recipient report block and the}
{elements of the array respectively.}
{}
IPMReportBlockHeader = record
msgID: IPMMsgID; { message id of the original }
creationTime: UTCTime; { creation time of the report }
end;
OCERecipientReport = record
rcptIndex: INTEGER; { index of recipient in original message }
result: OSErr; { result of sending letter to this recipient}
end;
{***********************************************************************}
IPMParamBlockPtr = ^IPMParamBlock;
IPMIOCompletionProcPtr = ProcPtr; { PROCEDURE IPMIOCompletion(paramBlock: IPMParamBlockPtr); }
IPMIOCompletionUPP = UniversalProcPtr;
IPMOpenContextPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
contextRef: IPMContextRef; { <-- Context reference to be used in further calls}
end;
IPMCloseContextPB = IPMOpenContextPB;
IPMCreateQueuePB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
filler1: LONGINT;
queue: ^OCERecipient;
identity: AuthIdentity; { used only if queue is remote }
owner: ^PackedRecordID; { used only if queue is remote }
end;
{ For createqueue and deletequeue only queue and identity are used }
IPMDeleteQueuePB = IPMCreateQueuePB;
IPMOpenQueuePB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
contextRef: IPMContextRef;
queue: ^OCERecipient;
identity: AuthIdentity;
filter: ^IPMFilter;
newQueueRef: IPMQueueRef;
notificationProc: IPMNoteUPP;
userData: LONGINT;
noteType: IPMNotificationType;
padByte: SInt8; { Byte }
reserved: LONGINT;
reserved2: LONGINT;
end;
IPMCloseQueuePB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
queueRef: IPMQueueRef;
end;
IPMEnumerateQueuePB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
queueRef: IPMQueueRef;
startSeqNum: IPMSeqNum;
getProcHint: BOOLEAN;
getMsgType: BOOLEAN;
filler: INTEGER;
filter: ^IPMFilter;
numToGet: INTEGER;
numGotten: INTEGER;
enumCount: LONGINT;
enumBuffer: Ptr; { will be packed array of IPMMsgInfo }
actEnumCount: LONGINT;
end;
IPMChangeQueueFilterPB = IPMEnumerateQueuePB;
IPMDeleteMsgRangePB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
queueRef: IPMQueueRef;
startSeqNum: IPMSeqNum;
endSeqNum: IPMSeqNum;
lastSeqNum: IPMSeqNum;
end;
IPMOpenMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
queueRef: IPMQueueRef;
sequenceNum: IPMSeqNum;
newMsgRef: IPMMsgRef;
actualSeqNum: IPMSeqNum;
exactMatch: BOOLEAN;
padByte: SInt8; { Byte }
reserved: LONGINT;
end;
IPMOpenHFSMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
hfsPath: ^FSSpec;
filler: LONGINT;
newMsgRef: IPMMsgRef;
filler2: LONGINT;
filler3: SInt8; { Byte }
filler4: BOOLEAN;
reserved: LONGINT;
end;
IPMOpenBlockAsMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
filler: LONGINT;
newMsgRef: IPMMsgRef;
filler2: array[0..6] of INTEGER;
blockIndex: INTEGER;
end;
IPMCloseMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
deleteMsg: BOOLEAN;
filler1: BOOLEAN;
end;
IPMGetMsgInfoPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
info: ^IPMMsgInfo;
end;
IPMReadHeaderPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
fieldSelector: INTEGER;
offset: LONGINT;
count: LONGINT;
buffer: Ptr;
actualCount: LONGINT;
filler: INTEGER;
remaining: LONGINT;
end;
IPMReadRecipientPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
rcptIndex: INTEGER;
offset: LONGINT;
count: LONGINT;
buffer: Ptr;
actualCount: LONGINT;
reserved: INTEGER; { must be zero }
remaining: LONGINT;
originalIndex: INTEGER;
recipientOffsetFlags: OCERecipientOffsetFlags;
filler1: BOOLEAN;
end;
{}
{replyQueue works like recipient. [can no longer read it via ReadHeader]}
{OriginalIndex is meaningless, rcptFlags are used seperately and there are}
{currently none defined.}
{}
IPMReadReplyQueuePB = IPMReadRecipientPB;
IPMGetBlkIndexPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
blockType: IPMBlockType;
index: INTEGER;
startingFrom: INTEGER;
actualBlockType: IPMBlockType;
actualBlockIndex: INTEGER;
end;
IPMReadMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
mode: IPMAccessMode;
offset: LONGINT;
count: LONGINT;
buffer: Ptr;
actualCount: LONGINT;
blockIndex: INTEGER;
remaining: LONGINT;
end;
IPMVerifySignaturePB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
signatureContext: SIGContextPtr;
end;
IPMNewMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
filler: LONGINT;
recipient: ^OCERecipient;
replyQueue: ^OCERecipient;
procHint: StringPtr;
filler2: INTEGER;
msgType: ^IPMMsgType;
refCon: LONGINT;
newMsgRef: IPMMsgRef;
filler3: INTEGER;
filler4: LONGINT;
identity: AuthIdentity;
sender: ^IPMSender;
internalUse: LONGINT;
internalUse2: LONGINT;
end;
IPMNewHFSMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
hfsPath: ^FSSpec;
recipient: ^OCERecipient;
replyQueue: ^OCERecipient;
procHint: StringPtr;
filler2: INTEGER;
msgType: ^IPMMsgType;
refCon: LONGINT;
newMsgRef: IPMMsgRef;
filler3: INTEGER;
filler4: LONGINT;
identity: AuthIdentity;
sender: ^IPMSender;
internalUse: LONGINT;
internalUse2: LONGINT;
end;
IPMNestMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
filler: array[0..8] of INTEGER;
refCon: LONGINT;
msgToNest: IPMMsgRef;
filler2: INTEGER;
startingOffset: LONGINT;
end;
IPMNewNestedMsgBlockPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
recipient: ^OCERecipient;
replyQueue: ^OCERecipient;
procHint: StringPtr;
filler1: INTEGER;
msgType: ^IPMMsgType;
refCon: LONGINT;
newMsgRef: IPMMsgRef;
filler2: INTEGER;
startingOffset: LONGINT;
identity: AuthIdentity;
sender: ^IPMSender;
internalUse: LONGINT;
internalUse2: LONGINT;
end;
IPMEndMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
msgID: IPMMsgID;
msgTitle: ^RString;
deliveryNotification: IPMNotificationType;
priority: IPMPriority;
cancel: BOOLEAN;
padByte: SInt8; { Byte }
reserved: LONGINT;
signature: SIGSignaturePtr;
signatureSize: Size;
signatureContext: SIGContextPtr;
{ family this msg belongs (e.g. mail) use kIPMFamilyUnspecified by default }
family: OSType;
end;
IPMAddRecipientPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
recipient: ^OCERecipient;
reserved: LONGINT;
end;
IPMAddReplyQueuePB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
filler: LONGINT;
replyQueue: ^OCERecipient;
end;
IPMNewBlockPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
blockType: IPMBlockType;
filler: array[0..4] of INTEGER;
refCon: LONGINT;
filler2: array[0..2] of INTEGER;
startingOffset: LONGINT;
end;
IPMWriteMsgPB = record
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
msgRef: IPMMsgRef;
mode: IPMAccessMode;
offset: LONGINT;
count: LONGINT;
buffer: Ptr;
actualCount: LONGINT;
currentBlock: BOOLEAN;
filler1: BOOLEAN;
end;
IPMParamBlock = record
case INTEGER of
0: (
qLink: Ptr;
reservedH1: LONGINT;
reservedH2: LONGINT;
ioCompletion: IPMIOCompletionUPP;
ioResult: OSErr;
saveA5: LONGINT;
reqCode: INTEGER;
);
1: (
openContextPB: IPMOpenContextPB;
);
2: (
closeContextPB: IPMCloseContextPB;
);
3: (
createQueuePB: IPMCreateQueuePB;
);
4: (
deleteQueuePB: IPMDeleteQueuePB;
);
5: (
openQueuePB: IPMOpenQueuePB;
);
6: (
closeQueuePB: IPMCloseQueuePB;
);
7: (
enumerateQueuePB: IPMEnumerateQueuePB;
);
8: (
changeQueueFilterPB: IPMChangeQueueFilterPB;
);
9: (
deleteMsgRangePB: IPMDeleteMsgRangePB;
);
10: (
openMsgPB: IPMOpenMsgPB;
);
11: (
openHFSMsgPB: IPMOpenHFSMsgPB;
);
12: (
openBlockAsMsgPB: IPMOpenBlockAsMsgPB;
);
13: (
closeMsgPB: IPMCloseMsgPB;
);
14: (
getMsgInfoPB: IPMGetMsgInfoPB;
);
15: (
readHeaderPB: IPMReadHeaderPB;
);
16: (
readRecipientPB: IPMReadRecipientPB;
);
17: (
readReplyQueuePB: IPMReadReplyQueuePB;
);
18: (
getBlkIndexPB: IPMGetBlkIndexPB;
);
19: (
readMsgPB: IPMReadMsgPB;
);
20: (
verifySignaturePB: IPMVerifySignaturePB;
);
21: (
newMsgPB: IPMNewMsgPB;
);
22: (
newHFSMsgPB: IPMNewHFSMsgPB;
);
23: (
nestMsgPB: IPMNestMsgPB;
);
24: (
newNestedMsgBlockPB: IPMNewNestedMsgBlockPB;
);
25: (
endMsgPB: IPMEndMsgPB;
);
26: (
addRecipientPB: IPMAddRecipientPB;
);
27: (
addReplyQueuePB: IPMAddReplyQueuePB;
);
28: (
newBlockPB: IPMNewBlockPB;
);
29: (
writeMsgPB: IPMWriteMsgPB;
);
end;
const
uppIPMIOCompletionProcInfo = $000000C0; { PROCEDURE (4 byte param); }
procedure CallIPMIOCompletionProc (paramBlock: IPMParamBlockPtr; userRoutine: IPMIOCompletionUPP);
{$IFC NOT GENERATINGCFM}
inline
$205F, $4E90;
{$ENDC}
function NewIPMIOCompletionProc (userRoutine: IPMIOCompletionProcPtr): IPMIOCompletionUPP;
{$IFC NOT GENERATINGCFM }
inline
$2E9F;
{$ENDC}
function IPMOpenContext (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $400, $AA5E;
{$ENDC}
function IPMCloseContext (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $401, $AA5E;
{$ENDC}
function IPMNewMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $402, $AA5E;
{$ENDC}
function IPMNewBlock (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $404, $AA5E;
{$ENDC}
function IPMNewNestedMsgBlock (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $405, $AA5E;
{$ENDC}
function IPMNestMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $406, $AA5E;
{$ENDC}
function IPMWriteMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $407, $AA5E;
{$ENDC}
function IPMEndMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $408, $AA5E;
{$ENDC}
function IPMOpenQueue (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $409, $AA5E;
{$ENDC}
function IPMCloseQueue (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $40A, $AA5E;
{$ENDC}
{ Always synchronous }
function IPMVerifySignature (paramBlock: IPMParamBlockPtr): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$7000, $1f00, $3F3C, $422, $AA5E;
{$ENDC}
function IPMOpenMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $40B, $AA5E;
{$ENDC}
function IPMCloseMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $40C, $AA5E;
{$ENDC}
function IPMReadMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $40D, $AA5E;
{$ENDC}
function IPMReadHeader (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $40E, $AA5E;
{$ENDC}
function IPMOpenBlockAsMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $40F, $AA5E;
{$ENDC}
function IPMNewHFSMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $41E, $AA5E;
{$ENDC}
function IPMReadRecipient (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $410, $AA5E;
{$ENDC}
function IPMReadReplyQueue (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $421, $AA5E;
{$ENDC}
function IPMCreateQueue (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $411, $AA5E;
{$ENDC}
function IPMDeleteQueue (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $412, $AA5E;
{$ENDC}
function IPMEnumerateQueue (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $413, $AA5E;
{$ENDC}
function IPMChangeQueueFilter (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $414, $AA5E;
{$ENDC}
function IPMDeleteMsgRange (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $415, $AA5E;
{$ENDC}
function IPMAddRecipient (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $403, $AA5E;
{$ENDC}
function IPMAddReplyQueue (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $41D, $AA5E;
{$ENDC}
function IPMOpenHFSMsg (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $417, $AA5E;
{$ENDC}
function IPMGetBlkIndex (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $418, $AA5E;
{$ENDC}
function IPMGetMsgInfo (paramBlock: IPMParamBlockPtr; async: BOOLEAN): OSErr;
{$IFC NOT GENERATINGCFM}
inline
$3F3C, $419, $AA5E;
{$ENDC}
{ $ALIGN RESET}
{ $POP}
{$ENDC}
{__OCEMESSAGING__}
implementation
end.